package com.hwadee.teachingprocessmanagementsystem.dto.teacher;

import com.hwadee.teachingprocessmanagementsystem.dto.teacher.CourseTeacherInfo;
import com.hwadee.teachingprocessmanagementsystem.entity.CourseChangeRequest;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
 * @Description: 教师调课申请Dto
 * @Author：keyixuan
 * @Package：com.hwadee.teachingprocessmanagementsystem.dto.teacher
 * @Project：teaching-process-management-system-back
 * @name：TeacherCourseChangeDto
 * @Date：2024/7/17 10:55
 * @Filename：TeacherCourseChangeDto
 */
@Data
public class TeacherCourseChangeDto implements Serializable {
    private List<CourseTeacherInfo> courseTeacherList;
    private List<CourseChangeRequest> courseChangeRequestList;

    public void addCourseTeacherInfo(CourseTeacherInfo courseTeacherInfo) {
        if (this.courseTeacherList == null) {
            this.courseTeacherList = new ArrayList<>();
        }
        this.courseTeacherList.add(courseTeacherInfo);
    }

    public void addCourseTeacherInfo(String courseId, String courseName, String teacherId, String teacherName){
        CourseTeacherInfo courseTeacherInfo = new CourseTeacherInfo(courseId, courseName, teacherId, teacherName);
        this.addCourseTeacherInfo(courseTeacherInfo);
    }
}

@Data
class CourseTeacherInfo implements Serializable {
    // 课程编号
    private String courseId;
    // 课程名
    private String courseName;
    // 教师编号
    private String teacherId;
    // 教师名
    private String teacherName;

    public CourseTeacherInfo() {
    }

    public CourseTeacherInfo(String courseId, String courseName, String teacherId, String teacherName) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.teacherId = teacherId;
        this.teacherName = teacherName;
    }
}
